spooky head implementation
Refactor as per seldaek suggestions