removed extraneous L characters & fixed code