add limitlen, same as php