my script is nominally working the way I want it to