Added thread_group to carpi closes #12

now classes which are used by the threads have to be written.