implement writelc()/readlc()