changes to DRY approach