finishes extracting of session to places where it's necessary