mostly class based system, still needs some refining