refactoring and messages,relations add