Update pulse function