Closes #47
Thanks to Zhelyazkov