update test and seperate cli file