refactored assistant.