I think it would be clearer to create a separate "wave" variable or something then += that.