added two complementary classes, also improved constructors to be more flexible and versatile.