preprocessing directory