final ls.cpp