only set callback if provided, fixes #2
Merge pull request #3 from fredkelly/master

only set callback if provided, fixes #2