took about script from canvas heroku epic pt.4
added js drawing code to seperate file