refactor ready