documet logic change