addded compact mode