my code for first exercise