working on CLI thread