added min/max for waves