reverted to custom queries