added improvements to user id passing