Changes to pulse algo

Last checking before end of hackathon