refactor, more efficient - DRY