added gap-mode