rename fn
adding cmd
tidied and linted cmd.js