refactored hibernate sessions