Effect of Nb addition to Ni and Fe on electronic structure and magnetic properties