Added a trigger function that checks the answer when the user presses the 'Check' button