p39 impl and test working on p40