added function for removing all odd numbers without flattening