wrote some queries