move commands to separate js file