moved around result message logic