smaller changes but still attempting the DRY approach