contexts refactored