Calculation of hyperfine coupling constants using second order double perturbation theory and the configuration interaction method