First method implementation and refactoring