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

More implementation for issue #46