add example html file. fix errors in vector code