adding latest version of the code