add length restriction