intorduced 'cmd()' function