now hooks to the view accepts coderefs as argument