this function should go to system-messages.js too !