head and put still have some bugs