Completed 2 functions