fix bugs + fix logics + add UI code + clear code