vastly improved solution 9. from ~6s to ~.05s