Old code refactoring
Old code refactoring