This was my initial code.