added return value for ls function