updated code to reflect refactoring out core API to another project