Boston Bruins forward David Krejci signed a contract extension with the team on Thursday. He is now signed through the 2020-21 season.

The extension is for six years and $43.5 million. Krejci was about to enter the final year of his contract which was worth $5.25 million. He would have become an unrestricted free agent at the end of the upcoming season if a deal hadn’t been reached. Krejci will have a $7.25 million salary cap hit, which makes him the highest paid player on the Bruins team, according to the Boston Globe. Goalie Tuukka Rask has a salary cap hit of $7 million, defenseman Zdeno Chara has a $6.916 million cap hit, and center Patrice Bergeron has a $6.5 million cap hit.

Krejci was drafted by the Bruins in the second round of the 2004 draft. The extension is good news for the Bruins as Krejci is one of their best players. He had 19 goals, 50 assists, led the Bruins in scoring with 69 points, and had a plus-37 rating, which was the best in the NHL, last season, according to NHL.com. In 504 career games he has 378 points, 110 goals, and 268assists. He won the Stanley Cup in 2011.

The Bruins will have a lot of free agent in the next two years. Carl Soderberg, Gregory Campbell, Daniel Paille, Johnny Boychuk, Adam McQuaid, and Matt Bartkowski will be unrestricted free agents at the end of the upcoming season. Dougie Hamilton will be a restricted free agent at the end of this season. Milan Lucic and Loui Eriksson will be unrestricted free agents after the 2015-16 season. The Bruins haven’t signed Torey Krug and Reilly Smith for the upcoming season yet.