separating preprocessing and publishin