the second version of code