starting to DRY the code out