updated ls.cpp