base code done Ui & thread done.