changed user_id to the session variable