move line to return parent array item to after if statement, to add numbers before top-level items in array