Apple and Samsung have been battling over patents since 2012, and a question about how much money could be owed for infringing design patents made it all the way to the Supreme Court in late 2016. In December, the Supreme Court said in a unanimous opinion that damages for design patent infringement can be based only on the part of the device that infringed the patents, not necessarily on the entire product.

The lawsuit was originally settled in 2012, with a court ordering Samsung to pay Apple more than $1 billion in damages. Since then Samsung has been slowly depreciating the figure, it stands at $400 Million as of now. Samsung actually paid $548 million to Apple in December 2015 because its chances looked so poor. But then in December 2016 the Supreme Court ruled that the instructions to the jury in the original trial were too broad, that rather than calculating damages based on the price of entire phones sold, damages should only be limited to components or parts of the design that violated patents.

The judgement was made by Judge Lucy Koh of the United States District Court for the Northern District of California, with the ruling spotted and shared by patent lawyer Florian Mueller.

“The Court finds that the jury instructions given at trial did not accurately reflect the law and that the instructions prejudiced Samsung by precluding the jury from considering whether the relevant article of manufacture… was something other than the entire phone,” Koh wrote in the order, handing Samsung a victory in its quest for a retrial.