refactored queries for peristables to base class