Changed to use function that does the same.