minor fixes for dimensions
dimensions are initialized from input arrays
remove print statements