added more query stuff