adding support for manually defined regular expression matches. also added invocation count for handlers