solved negative numbers, also malloc off by one error argh