wrap foundation load into function

wasn't working without this