Added getType function