What is the difference with these two sets of code