complete refatoring due to hibernat eimplemantation