solve assignment 2