fixed loop that goes through all the objective function coefs