Writing the implementation