generalised script, verified, reproduced Alta + ISE