parsing data from sqlite db