complete with query poll and store into db