solve assignment 3