add wave switch functionality