calculating message, etc.