added the ability to calculate the number of rows. Done in order to reduce the copying overhead in MATLAB.
updated the pipeline to work with the sanityCheck.m
Added some code to help in parallelization, still under construction (the code is commented)