set handling
using j for index
sets using join
reduced get calls for timing/guages in api
declare and share stats vars earlier