added test for element before adding event to increment and decrement buttons