adding to A variable correctly