use port for heroku
call getUM at beginning and use imagedata instead of recreating the canvas