moved arry push outside if/else, saved .3s total runtime