implement simple ls as ex for chapter 4