updated L2P code