update to new pyptlib API