refactored use of differents ls