Started working on query_builder function