added function to set num of spin up and down electrons