improve data check