added function to identify bad trials + tested it

remove_trials modified accordingly