fix the problem of argument, but still seg fault at some part