refactoring contexture