util function remov state given collect state param ret collect state remov state collect ret collect top arrai list object state ret model facad composit state state model facad state top add state ret remov top 