checking before i add thread locks
added timeout and pid stuff to process method