added helper method to check table