pre-processing withs into function applications