working check for data size

Change-Id: I05f2e55429491c6ff37bfcdeb58f328f29e9d5bb