Finished PS exercise 2