do oddmembers and countoddmembers functions, with/without if/else. next problem seems interesting