chain rule was right after all