editing advertisement refactored