update style and fix bugs