changed structure before creating partial derivative calculator