replace uid -> userId