initial message handling functions