working with session resource