updated to work with new closure types
Merge pull request #50 from csherratt/master

updated to work with new closure types