refactor anal