solve assignment 7