rewritten IO
ooops
added threading module