modified for ls command and test command