implemented directory functions and ls