revise the commend function