Improve integral calc