finish but some bugs need fix