refactoring - domains for challenges (completed but needs a few unit test)