added db functionality
script for retrieving results since latest result and save to db