refactored code to removed ('session_id') ==