added lcmodel function