Closes #40. thx @alexthemitchell