add headtail problem and modified readme and main