added the onArrival and setTitle methods