added thread message buffer, msg system, thread per human and some functions