remove threading, doing it manually