refactored framework