some DRY cleanup