Completed functions 1-5