migrate to hibernate