Foundations of communication theory