Issue #1 some functions to preprocess