modifying a lot of codes