refine the commands