modifying as per fernando's comments