added socket header;still losing messages;still need timing