intermediate code, will compile but issue with indexing cellParentIds that I cant figure out