try to fetch data from db and convert to struct