Here is my version of the code