Solving problem with extension method