fixed improper data input
little malloc test
not working 3-1