refactoring of agenda