added optional config param at point of instantiation

Add OPTIONAL configuration object to be injected in at the point of instantiation. #1957