fix arg number, fix logic