Updated code following L3 review