edited controller for user id