trying 2 versions of the code