Updated with part of integration_qk