added \n, optimized int16->int