added a keyboard listner that checks the answer at runtime