added a method to get the string length. removed a extra string value