Completed all 12 functions for Project 4 updated some codes