refactoring, adding Arena API