Updated the codes