added support for different types of questions