added script for ls.cpp