Solves #18

Solves the issue #18 where islice needs to be indexed by an integer.