added framework for jg_juggle and jg_format functions