migrated to spring and hibernate