improved gallery navigation