adding ability to pass a function to put