moving API outside of application