upgrade libs + add different sorting in gallery