small query cleaning