Refactor before