refactoring use of API- no API in this push