added some very basic pulse code