hanlder and some threads