oh shit, copy paste error. Anyway, this needs a bit of work and it should use those helper functions you were changing anyway.