I suppose you should take x and y and put result into z instead of a