modified the code segment