Suggestion: Gallery function can be better?