Fix this
Better array management