first and last class methods
Merge pull request #378 from subvertallchris/query

first and last class methods