added gap setting