Updating code to shorthand operations