Updating code as per @astralbodies's suggestion