use Regexp.test() instead of String.match(). fix indentation.