added a get from db function