Result by time and result by distance logic has been developed.