change api. fix: connection and callbacks.