finished updating code