cleaned code to just support the basic travelling wave