fix deprecation warnings
update cli usage in examples