minor refactorign