Some bugs fixed. but there is something wrong with read_head and read_tail when we do delay 5, delay 5.