Added option to customize client context