DRY up code
extract method