addded cli function