- changed setOverlay function to get success or failure status