start writing query. not finished