adding callback when uri is generated correctly