Realizationf of shingles algorithm