refactoring move text as parameter