refactored lwrp into libs