added DB support with help of Hibernate