modifying some codes