query, add and delete on connected numbers