support ~indices topic to specify indices vector of the points and refactor codes