thread for catching changes