added get type function