update gallery load button
refactoring