fixing formatting and making directories list properly