whoops. Missed a merge with a crucial part of credential-fn functionality