refactor hub and socket actors