refactored lwrp