script to mark amendments as valid