many bugs fixed;