generate working for linear dir