DRY up code
DRY up code