refactor levels