revise all query and schema....crazy