trying to get rid of doubled output