refactored qbank logic into its own class/methods