make sure the id is valid before including it in the result set
tests for methods