respond to isuue1:add length check