added the generic function