Update Kahn Algorithm