all main queries working