first version of html canvas. lots of cleanup needed