Refactor for my understanding