add syntax detection and redo