Played with algorithm