Change defsite to a function