Applied changes from @wchen-r7's comments