refactor remote manager