Added ability to assign a function to the chain property of a field