added directory reading capability, needs work though