version 2.1 by David (log included in google drive)