revamped structure of classes