test of Adam's script, plus some modifications