fixing it up as per kenneth's comments