This function is too long.