add user control,fix some bugs