changing guy's code