Added check answer function