hassans threading, logging & other functionality