my assignment 2 functions