added dir attribute