Refactor. Reusable code