add get by type function