More implementation for issue #46
Merge pull request #89 from jpav/master

More implementation for issue #46