allow code to be supplied as a param