DRY up these two methods.