I think you need to bind this in order to get the cortex object inside the forEach loop