solve assignment 5