rewrote a couple functions with the new interface"