working with arrays in memory
almost there