Refactored session to response