begin hw03, part 1 funtional