update basic ls.cpp implementation and LICENSE