Updated the first code