changes by @mariomc on #1