serious improvements, moving from old class structure