changed so type is returned as ID