Question5 functionality completed