added more query work