fixed bug in placement of 'r = 0' in largest_vertical_product method