Updated routine