adding a bunch of new functions. will split this up into multiple commits