Move utils function to utils.h and add some command