Modified some codes