change directories struct
fix bug