Adding code to solve the itrix problems