Uncompiled code for coreFuncTrials (will add uncompiled code for coreFuncNoTrials upon completion