Changing to use hibernate