assignment 3 starting code. implemented query inputer