optimised A and B vals