Adding all code so far