refactor checking answer method in solutions model