null terminate input