Create 'cmd' function to make things easier

Signed-off-by: Ian Macalinao <ian@giza.us>