complete the logic for ls command