add length limit && more case