Added the rest of the code