state pattern
daemon of UNP
state pattern
fix memory leakage caused by new