Temporary implementation of range()