refactored ccl.context