preseed as a separated function.