when a wave travel through a medium_____​