adding testing code, unittest for individual components.