updated hibernates. work with classes