I might refactor this to have the same speed improvement but also be clearer.. I don't like empty whiles