sorted out a bunch of syntax, changed to scratch file