move answer checking to server-side