implemented lc_main