improved logic to cope with storage datas