Added implementation for head.