Complexity of session function reduced :)