range checks should come first...
added filtering on method names using regex.