adding tests and writing updating script