[some modification jul 16]