added threads.c and a makefile