refactoring to keep consistent api