ported to new lwp version