initial data analyis and filtering