1st exercise for double function