added a bunch of new functions