working model of class generator