Adding all the code