added functionality, SQL Queries