Created library to run impulse counter