solve assignment 6