changed API to use int for id's