minor refactor - extract common method