refactor and interface changes