errors
format and filter query