revised code added