mine:loop-command: add new function for looping command
Delete needless function