refactored some cli after morning lecture