Now uses local memory