configuration options for #4 and #6 added