write docs for preprocessing pattern