minor refacting