added loop while retrieving coordinator