cleanup code for fetching clusters