code change to handle 0 second interval