added l / w setting at beginning