create threads; fixed some shits