enhanced test framework and added some tests