api additions, controller logic moved to classes (for api)