added pulsar example
fixed some small bug