fixing queries more