Adding problem refactored.