fix bugs and design