Array reimplemented (better design)