major update on code structure
class restructured