refactored small thing