refactor msg(not finished)