ex2 - finished assignment