thread problem solved