Refactoring,optimization function "Add Album"