2 part of privite api refactoring