update ls.cpp that works with tag a, tag l, and tag R