Updating code to fix changes