Finish working solution for the assignment