begin to refactor demo task