moved this to SharedUtil.h/cpp