Side-locked headaches: an algorithm-based approach