refactored api changes