fix bugs and can work now