removed unneeded functions; renamed sync to save