making service and session objects serializable