Suggest to break down the function to make it more testable.