refactor course creation