fixed many bugs and iprove message