add state and head