//Merged pull request 124 - thanks to @rynge