milestone1: complete the function