added a bunch of functional tests (most pending)