Print out the values of a b c & d to make sure they contain the values you think they should.