Updated Sumeet code