Added last hit function