extracted configure_message method