made it more DRY