simple shingle algorithmx