added changed flow

Changed flow to check for non existent changes
Need to add flow to write changes at once rather than in chunks