throwing errors on empty head/last.. eh