This runs slower than I'd like, but I wanted to check my initial solution submitted so I can iterate on it later.