functionalized the checking of answers