added a second canvas and changed code accordingly