add styles and rewrite js