added images sorting feature