threads support

part 1