add function to replace all zeros with the max odd number to the right