if(thread==null) {  return true; }
    public boolean waitTillStopped(long seconds) {        try {            if (seconds == 0) {                thread.join();            } else {                thread.join(seconds * 1000);            }            return thread.isAlive();        } catch (InterruptedException e) {            return false;        }    }