updated a and b