modified the codes