start of retrieving layers
retrieve layers and clear