added dir creation
improved a script