implemented dialog service for both