now with regex matching, also fixed "this" passing