changed to use sqlite