adding everything necessary for JIT implementation and edits for dimensionality restructuring