filter invalid data