rename of parse to encodePulses, proper mocha tests