Refactoring - getContextData