linking function