cli working and refactor in process