fixes #25, adding fn
Merge upstream 'master' into master