refactored whereClause part in query/update_query and added some documentation