I regret spending 4 hours on this