adding date and compound querying