Updated some codes