Added logic for pulse function

Added in pulse and pulse wave functions