added sound distance logic