creating threads in threads.c
started working on the buffer sorting