fix bugs and new features