refactor remote tests