modified and added features to dynamic sqlite reads