Added class type and Class function now takes class type