refactoring market context data