including A-optimization but not working as expected