added gallery mode