removed print statements and commented out stuff for dynamic arrays