refactoring for notification classs separate render method