SmartThings IDE ‘Events’ log shows duplicate events

I have a custome DH which seames to be sending duplicate events is this a codeing issue or just how the IDE shows things some time. but its not every time. i do have a state counter
wich i have tryed moving from ‘on’ to ‘update’ as its also called in the ‘off’ do i thought i shoulod define it once. however all that it seams to have done is duplicate the updated/update wich i hadnent noticed before. Any advice?
def on() {
//state.counter = state.counter “Executing on”
def updated() { “updated”
runIn(02, update)

def update() { “update”
state.counter = 0