Added code that finds out the input data size