extract, allow for DRY code