added getType method