added 6.2: finished assignment 6