update querys and tests