main framework has been finished,but lots of bugs to be fixed