improved numerical efficiency