Generalized version for linked programs