removed class name function and placed code in construct