Now uses a function.