make totalKey configurable