Added logic to check numerical answers