added pagination handling to getQuestion