implemented #136. @presleyp : can you send me a sample for testing?