added new function for range
added part to check for len() function converts to length()