worked on a answer function