added getType() to all classes