refactored for mock client and faye distribution