integrate html and fix bugs