use lwrp correctly with template