refactor code, add types of questions