completing the code
cleaning up the code