Refactor updated