why 2 separate examples doing almost the same?