Updated the code with the latest integration