sorts out user_id variable not found