error in indexed array search
error processing flat waves