bring .net solution in line with java one