First version of my code