Add queries to models