Updated the code to handle last commit changes