Added partial derivatives needed for master formula