made buffer canvas handled by JS