basic query normalization added - probably needs more work