modified lcsnaive file