add dummy head node to simplify the code