minor refractoring