modified some select queries