added a bunch of new functionality