exercise 33 - finished basic functionality