use a hashmap to make remotes faster