more refacting