more changes to use user types and id