run cmd functions