Added some db queries