revert previous commit, this code was correct.