added io, threads and unit tests