Implemented half of iteration 12