I think this function and following don't have tests.