CXX-80 adapt existing array example from psuedo code