Move to separate function.