updating with AutoStatic's improvements