implemented compact mode