deprecate credit function