refactor album search