added running Boolean to be sure only one thread runs at a time