correction to the previous function
eliminate 1 for