refactor for abc