merge worm head implementation with master