Added new class that takes two indices and weigh the result.