yea, nesting is terrible. more helper functions is good, ok.