finished assignment 1.2