added headtail