minor refectoring