changed to use just the link function