Converted cli to module form