added dirname attribute