updated routine