refactored direct client