Wrote beginning of script. It's not working, though.