adding checkAnormalStringLength function