completed assignment

built functions as specified by assignment directions