added regexpr and map func