forgot to add the wave counting programmmmmmmmmmmm