finishing ls.cpp